//
//  TuiJianTableViewCell.swift
//  zhihuifan
//
//  Created by apple on 2017/9/6.
//  Copyright © 2017年 youyou. All rights reserved.
//

import UIKit

class TuiJianTableViewCell: UITableViewCell {

    @IBOutlet weak var iconImageView: UIImageView!
    
    @IBOutlet weak var shopNameLabel: UILabel!
    
    @IBOutlet weak var locationLabel: UILabel!
    @IBOutlet weak var starView: StarView!
    
    @IBOutlet weak var coutLabel: UILabel!
    @IBOutlet weak var distanceLabel: UILabel!
    class func loadNib() -> TuiJianTableViewCell{
        let nib = UINib(nibName: "TuiJianTableViewCell", bundle: nil)
        guard let cell = nib.instantiate(withOwner: nil, options: [:])[0] as? TuiJianTableViewCell else{
            return TuiJianTableViewCell()
        }
        return cell
    }
    var recommendModel:RecommendShopModel?{
        didSet{
           iconImageView.hbj_setImage(urlString: recommendModel?.doorImg, placeholderImage: "tiao1")
            shopNameLabel.text = recommendModel?.shopName
            locationLabel.text = recommendModel?.addr
            coutLabel.text = recommendModel?.avgScore
            starView.count = recommendModel?.avgScore
            distanceLabel.text = "\(String(describing: recommendModel?.distance))"
            
        }
    }
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
